<!DOCTYPE html>
<html lang="en" manifest="demo.appcache">
<head>
    <meta charset="UTF-8">
    <title>canvas</title>
    <script type="text/javascript">
        var w;
        function draw() {
            var c = window.document.getElementById('mycanvas');
            var cxt = c.getContext('2d');
            cxt.fillStyle = '#FF0000';
            cxt.fillRect(0,0,150,75);
        }
        function start() {
            alert(typeof(w));
            w = new Worker("/js/demo_works.js");
            w.onmessage = function (event) {
                document.getElementById("result").innerHTML = event.data;
            }
        }
    </script>
</head>
<body onload="draw()">
<canvas id="mycanvas"  width="200" height="100"></canvas>
<p>计数: <output id="result"></output></p>
<button onclick="start()">start</button>
<br/>
<!--dslajdaslj-->
<input align="center" type="email"/>
<input type="submit"/>
</body>
</html>